package com.steak.account.adapter;

import com.steak.account.execute.AccountExecute;
import com.steak.common.domain.dataobject.tcc.Order;
import com.steak.common.result.Response;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 刘牌
 * @Title:
 * @date 2022/3/721:38
 */
@RestController
@RequestMapping("/account")
@AllArgsConstructor
public class AccountController {

    final AccountExecute accountExecute;

    @RequestMapping("/decreaseBalance")
    public Response decreaseBalance(@RequestBody Order order){
        return accountExecute.decreaseBalance(order);
    }
}
